﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bingosoft.Web.Utils;
using HHMMS.Core.Service;

namespace HHMMS.UI.Modules.PlanManager
{
    public partial class PartsDiscardRecordList : ListPage
    {
        private readonly PartsDiscardService _partsDiscardService = ObjectHelper.GetObject<PartsDiscardService>();        

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void SearchGrid(object sender, EventArgs e)
        {
            this.GridSearch.Search();
        }

        protected void RefreshGrid(object sender, EventArgs e)
        {
            this.GridSearch.Refresh();
        }

        protected void DeletePartsDiscardRecord(object sender, EventArgs e)
        {
            ImageButton ctr = sender as ImageButton;
            String id = ctr.Attributes["_ID"];

            this._partsDiscardService.DeletePartsDiscardRecord(id);

            this.GridSearch.Search();
        }

    }
}